<template>
  <div class="page page-doccenter-details">
    <div class="navbar">
      <div class="navbar-inner sliding">
        <div class="left">
          <a href="#" class="link back">
            <i class="icon icon-back"></i>
            <span class="ios-only">返回</span>
          </a>
        </div>
        <div class="title">{{title}}</div>
      </div>
    </div>
    <div class="page-content ">

      <h2>。。。</h2>

    </div>
  </div>


</template>
<style>


</style>
<script>
  return {
    // Lifecycle Hooks
    beforeCreate() {
      console.log('componentBeforeCreate', this);
    },
    created() {
      console.log('componentCreated', this);
    },
    beforeMount() {
      console.log('componentBeforeMount', this);

    },
    mounted() {
      console.log('componentMounted', this);
      console.log('组件转载完成，拿全局变量中的用户信息去查询后台', this.$root.user);
      app.preloader.show()
      setTimeout(function () {
        this.details = {
          content:'公文中心详情页！'
        };
        this.updataDoccenterDetailView();
        app.preloader.hide();//打开加载器
      }.bind(this),1000)
    },
    beforeDestroy() {
      console.log('componentBeforeDestroy', this);

    },
    destroyed() {
      console.log('componentDestroyed', this);
    },
    // Component Data
    data: function () {
      // Must return an object
      return {
        title: this.$route.params.title,
        id: this.$route.params.id,
        details:{
          content:''
        }
      }
    },
    // Component Methods
    methods: {
      updataDoccenterDetailView:function () {
        $$('.page-doccenter-details .page-content').html(this.details.content);
      }
    },
    // Page Events
    on: {
      pageMounted: function (e, page) {
        console.log('pageMounted', page);
      },
      pageInit: function (e, page) {
        console.log('pageInit', page);
      },
      pageBeforeIn: function (e, page) {
        console.log('pageBeforeIn', page);
      },
      pageAfterIn: function (e, page) {
        console.log('pageAfterIn', page);
      },
      pageBeforeOut: function (e, page) {
        console.log('pageBeforeOut', page);
      },
      pageAfterOut: function (e, page) {
        console.log('pageAfterOut', page);
      },
      pageBeforeRemove: function (e, page) {
        console.log('pageBeforeRemove', page);
      },
    }
  };

</script>
